 import Qt 4.7
 import QtMobility.location 1.2

 Rectangle {
         id: page
         width: 350
         height: 350
         PositionSource {
             id: positionSource
             updateInterval: 1000
             active: true
             // nmeaSource: "nmealog.txt"
         }
         Column {
             Text {font.pointSize: 20; text: "<==== PositionSource ====>"}
             Text {font.pointSize: 20; text: "positioningMethod: "  + printableMethod(positionSource.positioningMethod)}
             Text {font.pointSize: 20; text: "nmeaSource: "         + positionSource.nmeaSource}
             Text {font.pointSize: 20; text: "updateInterval: "     + positionSource.updateInterval}
             Text {font.pointSize: 20; text: "active: "     + positionSource.active}
             Text {font.pointSize: 20; text: "<==== Position ====>"}
             Text {font.pointSize: 20; text: "latitude: "   + positionSource.position.coordinate.latitude}
             Text {font.pointSize: 20; text: "longitude: "   + positionSource.position.coordinate.longitude}
             Text {font.pointSize: 20; text: "altitude: "   + positionSource.position.coordinate.altitude}
             Text {font.pointSize: 20; text: "speed: " + positionSource.position.speed}
             Text {font.pointSize: 20; text: "timestamp: "  + positionSource.position.timestamp}
             Text {font.pointSize: 20; text: "altitudeValid: "  + positionSource.position.altitudeValid}
             Text {font.pointSize: 20; text: "longitudeValid: "  + positionSource.position.longitudeValid}
             Text {font.pointSize: 20; text: "latitudeValid: "  + positionSource.position.latitudeValid}
             Text {font.pointSize: 20; text: "speedValid: "     + positionSource.position.speedValid}
         }
         function printableMethod(method) {
             if (method == PositionSource.SatellitePositioningMethod)
                 return "Satellite";
             else if (method == PositionSource.NoPositioningMethod)
                 return "Not available"
             else if (method == PositionSource.NonSatellitePositioningMethod)
                 return "Non-satellite"
             else if (method == PositionSource.AllPositioningMethods)
                 return "All/multiple"
             return "source error";
         }
     }
